package com.ruoyi.web.controller.goods;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.goods.domain.GoodsGood;
import com.ruoyi.goods.service.IGoodsGoodService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

import static com.ruoyi.common.utils.PageUtils.startPage;

@RestController
@RequestMapping("/goods/good")
public class GoodsGoodController extends BaseController{
    @Autowired
    private IGoodsGoodService goodsGoodService;

    /**
     * 查询【请填写功能名称】列表
     */
    @PreAuthorize("@ss.hasPermi('system:good:list')")
    @GetMapping("/list")
    public TableDataInfo list(GoodsGood goodsGood)
    {
        startPage();
        List<GoodsGood> list = goodsGoodService.selectGoodsGoodList(goodsGood);
        return getDataTable(list);
    }
}
